package utils

import (
	"bufio"
	"io"
	"os"
)

func GetFileContent(path string) (string, error) {
	fi, err := os.Open(path)
	if err != nil {
		return "", err
	}
	defer fi.Close()
	br := bufio.NewReader(fi)
	var s string
	for {
		a, _, c := br.ReadLine()
		if c == io.EOF {
			break
		}
		s += string(a)+"\r\n"
	}
	return s, nil
}
